3.1.3 \(\int x^2 (a+b \log (c x^n)) \log (1+e x) \, dx\) [3]

Optimal. Leaf size=178 \[ \frac {4 b n x}{9 e^2}-\frac {5 b n x^2}{36 e}+\frac {2}{27} b n x^3-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log (1+e x)}{9 e^3}-\frac {1}{9} b n x^3 \log (1+e x)+\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)+\frac {b n \text {Li}_2(-e x)}{3 e^3} \]

[Out]

4/9*b*n*x/e^2-5/36*b*n*x^2/e+2/27*b*n*x^3-1/3*x*(a+b*ln(c*x^n))/e^2+1/6*x^2*(a+b*ln(c*x^n))/e-1/9*x^3*(a+b*ln(
c*x^n))-1/9*b*n*ln(e*x+1)/e^3-1/9*b*n*x^3*ln(e*x+1)+1/3*(a+b*ln(c*x^n))*ln(e*x+1)/e^3+1/3*x^3*(a+b*ln(c*x^n))*
ln(e*x+1)+1/3*b*n*polylog(2,-e*x)/e^3

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 178, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2442, 45, 2423, 2438} \begin {gather*} \frac {b n \text {PolyLog}(2,-e x)}{3 e^3}+\frac {\log (e x+1) \left (a+b \log \left (c x^n\right )\right )}{3 e^3}-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {1}{3} x^3 \log (e x+1) \left (a+b \log \left (c x^n\right )\right )+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log (e x+1)}{9 e^3}+\frac {4 b n x}{9 e^2}-\frac {1}{9} b n x^3 \log (e x+1)-\frac {5 b n x^2}{36 e}+\frac {2}{27} b n x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2*(a + b*Log[c*x^n])*Log[1 + e*x],x]

[Out]

(4*b*n*x)/(9*e^2) - (5*b*n*x^2)/(36*e) + (2*b*n*x^3)/27 - (x*(a + b*Log[c*x^n]))/(3*e^2) + (x^2*(a + b*Log[c*x
^n]))/(6*e) - (x^3*(a + b*Log[c*x^n]))/9 - (b*n*Log[1 + e*x])/(9*e^3) - (b*n*x^3*Log[1 + e*x])/9 + ((a + b*Log
[c*x^n])*Log[1 + e*x])/(3*e^3) + (x^3*(a + b*Log[c*x^n])*Log[1 + e*x])/3 + (b*n*PolyLog[2, -(e*x)])/(3*e^3)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2423

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((g_.)*(x_))^(q_.), x_Sym
bol] :> With[{u = IntHide[(g*x)^q*Log[d*(e + f*x^m)^r], x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[Dist
[1/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q + 1)/m] || (RationalQ[m] &
& RationalQ[q])) && NeQ[q, -1]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rubi steps

\begin {align*} \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x) \, dx &=-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )+\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-(b n) \int \left (-\frac {1}{3 e^2}+\frac {x}{6 e}-\frac {x^2}{9}+\frac {\log (1+e x)}{3 e^3 x}+\frac {1}{3} x^2 \log (1+e x)\right ) \, dx\\ &=\frac {b n x}{3 e^2}-\frac {b n x^2}{12 e}+\frac {1}{27} b n x^3-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )+\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)-\frac {1}{3} (b n) \int x^2 \log (1+e x) \, dx-\frac {(b n) \int \frac {\log (1+e x)}{x} \, dx}{3 e^3}\\ &=\frac {b n x}{3 e^2}-\frac {b n x^2}{12 e}+\frac {1}{27} b n x^3-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{9} b n x^3 \log (1+e x)+\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)+\frac {b n \text {Li}_2(-e x)}{3 e^3}+\frac {1}{9} (b e n) \int \frac {x^3}{1+e x} \, dx\\ &=\frac {b n x}{3 e^2}-\frac {b n x^2}{12 e}+\frac {1}{27} b n x^3-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {1}{9} b n x^3 \log (1+e x)+\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)+\frac {b n \text {Li}_2(-e x)}{3 e^3}+\frac {1}{9} (b e n) \int \left (\frac {1}{e^3}-\frac {x}{e^2}+\frac {x^2}{e}-\frac {1}{e^3 (1+e x)}\right ) \, dx\\ &=\frac {4 b n x}{9 e^2}-\frac {5 b n x^2}{36 e}+\frac {2}{27} b n x^3-\frac {x \left (a+b \log \left (c x^n\right )\right )}{3 e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{6 e}-\frac {1}{9} x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {b n \log (1+e x)}{9 e^3}-\frac {1}{9} b n x^3 \log (1+e x)+\frac {\left (a+b \log \left (c x^n\right )\right ) \log (1+e x)}{3 e^3}+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log (1+e x)+\frac {b n \text {Li}_2(-e x)}{3 e^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 161, normalized size = 0.90 \begin {gather*} \frac {-36 a e x+48 b e n x+18 a e^2 x^2-15 b e^2 n x^2-12 a e^3 x^3+8 b e^3 n x^3+36 a \log (1+e x)-12 b n \log (1+e x)+36 a e^3 x^3 \log (1+e x)-12 b e^3 n x^3 \log (1+e x)+6 b \log \left (c x^n\right ) \left (e x \left (-6+3 e x-2 e^2 x^2\right )+6 \left (1+e^3 x^3\right ) \log (1+e x)\right )+36 b n \text {Li}_2(-e x)}{108 e^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2*(a + b*Log[c*x^n])*Log[1 + e*x],x]

[Out]

(-36*a*e*x + 48*b*e*n*x + 18*a*e^2*x^2 - 15*b*e^2*n*x^2 - 12*a*e^3*x^3 + 8*b*e^3*n*x^3 + 36*a*Log[1 + e*x] - 1
2*b*n*Log[1 + e*x] + 36*a*e^3*x^3*Log[1 + e*x] - 12*b*e^3*n*x^3*Log[1 + e*x] + 6*b*Log[c*x^n]*(e*x*(-6 + 3*e*x
 - 2*e^2*x^2) + 6*(1 + e^3*x^3)*Log[1 + e*x]) + 36*b*n*PolyLog[2, -(e*x)])/(108*e^3)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.12, size = 870, normalized size = 4.89

method result size
risch \(\text {Expression too large to display}\) \(870\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a+b*ln(c*x^n))*ln(e*x+1),x,method=_RETURNVERBOSE)

[Out]

1/3*x^3*ln(e*x+1)*a-11/18*a/e^3+1/3*b*ln(c)*ln(e*x+1)*x^3+1/3/e^3*ln(e*x+1)*b*ln(c)+1/3*a/e^3*ln(e*x+1)+1/6*a/
e*x^2-1/9*ln(c)*b*x^3-1/9*x^3*a+(1/3*x^3*b*ln(e*x+1)+1/18*b*(-2*e^3*x^3+3*e^2*x^2-6*e*x+6*ln(e*x+1))/e^3)*ln(x
^n)-1/3*b*ln(c)*x/e^2+2/27*b*n*x^3-1/18*I*Pi*b*x^3*csgn(I*c)*csgn(I*c*x^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x^n)*csgn(I*c*x^n)+1/6*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2*ln(e*x+1)*x^3+1/6*I/e^3*
ln(e*x+1)*Pi*b*csgn(I*c)*csgn(I*c*x^n)^2+1/6*I/e^3*ln(e*x+1)*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 194, normalized size = 1.09 \begin {gather*} \frac {1}{3} \, {\left (\log \left (x e + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-x e\right )\right )} b n e^{\left (-3\right )} - \frac {1}{9} \, {\left (b {\left (n - 3 \, \log \left (c\right )\right )} - 3 \, a\right )} e^{\left (-3\right )} \log \left (x e + 1\right ) + \frac {1}{108} \, {\left (4 \, {\left (b {\left (2 \, n - 3 \, \log \left (c\right )\right )} - 3 \, a\right )} x^{3} e^{3} - 3 \, {\left (b {\left (5 \, n - 6 \, \log \left (c\right )\right )} - 6 \, a\right )} x^{2} e^{2} + 12 \, {\left (b {\left (4 \, n - 3 \, \log \left (c\right )\right )} - 3 \, a\right )} x e - 12 \, {\left ({\left (b {\left (n - 3 \, \log \left (c\right )\right )} - 3 \, a\right )} x^{3} e^{3} + 3 \, b n \log \left (x\right )\right )} \log \left (x e + 1\right ) - 6 \, {\left (2 \, b x^{3} e^{3} - 3 \, b x^{2} e^{2} + 6 \, b x e - 6 \, {\left (b x^{3} e^{3} + b\right )} \log \left (x e + 1\right )\right )} \log \left (x^{n}\right )\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))*log(e*x+1),x, algorithm="maxima")

[Out]

1/3*(log(x*e + 1)*log(x) + dilog(-x*e))*b*n*e^(-3) - 1/9*(b*(n - 3*log(c)) - 3*a)*e^(-3)*log(x*e + 1) + 1/108*
(4*(b*(2*n - 3*log(c)) - 3*a)*x^3*e^3 - 3*(b*(5*n - 6*log(c)) - 6*a)*x^2*e^2 + 12*(b*(4*n - 3*log(c)) - 3*a)*x
*e - 12*((b*(n - 3*log(c)) - 3*a)*x^3*e^3 + 3*b*n*log(x))*log(x*e + 1) - 6*(2*b*x^3*e^3 - 3*b*x^2*e^2 + 6*b*x*
e - 6*(b*x^3*e^3 + b)*log(x*e + 1))*log(x^n))*e^(-3)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))*log(e*x+1),x, algorithm="fricas")

[Out]

integral(b*x^2*log(c*x^n)*log(x*e + 1) + a*x^2*log(x*e + 1), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(a+b*ln(c*x**n))*ln(e*x+1),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(a+b*log(c*x^n))*log(e*x+1),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*x^2*log(x*e + 1), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,\ln \left (e\,x+1\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*log(e*x + 1)*(a + b*log(c*x^n)),x)

[Out]

int(x^2*log(e*x + 1)*(a + b*log(c*x^n)), x)

________________________________________________________________________________________